[
    async function(kuo,Context,context){    
        Context.headers["content-type"] ="text/txt; charset=UTF-8";
        this.$features = await Kuoplus("cms");
        let HCTime = Mode("Tools").Int(this.$features.configure['缓存时间']['0']);
        let HASH ="html/seo_map";
        Context.Cache = true;
        if(HCTime  > 0){
            let neirong = await Mem.Get(HASH);
            if(neirong){
                Context.body = neirong
                return ;
            }
        }
        let $DB = await db('cms_type');
        let XML = [WZHOST];
        let $hh = await $DB.Zhicha('url').Where({'off':2}).Select();
        if($hh){
            for(var tt in $hh){
                let $DATA = $hh[tt];
                XML.push(KuoLink([kuo.class, $DATA['url'] ]));
            }
        }
        $DB = await $DB.SetTable("cms_content");
        $hh = await $DB.Zhicha('url,atime').Where({'off':2}).Limit(2000).Select();
        if($hh){
            for(var tt in $hh){
                let $DATA = $hh[tt];
                XML.push(KuoLink([kuo.class, $DATA['url'] ]));
            }
        }
        Context.body = implode("\n",XML);
        if(HCTime  > 0 && Context.Cache){
            await Mem.Set(HASH,Context.body,HCTime);
        }
    }
]